import { http } from '@/utils/http/axios';

// 字典类型列表
export function getDictTypeList(data) {
  return http.request({
    url: '/admin/sys/dictionary/typePage',
    method: 'post',
    data,
  });
}

// 字典类型列表
export function addDictType(data) {
  return http.request({
    url: '/admin/sys/dictionary/typeAdd',
    method: 'post',
    data,
  });
}

// 字典类型列表
export function updateDictType(data) {
  return http.request({
    url: '/admin/sys/dictionary/typeUpdate',
    method: 'post',
    data,
  });
}

// 字典类型列表
export function deleteDictType(data) {
  return http.request({
    url: '/admin/sys/dictionary/typeDelete',
    method: 'post',
    data,
  });
}

// 字典类型详情
export function getDictTypeDetail(data) {
  return http.request({
    url: `/admin/sys/dictionary/typeInfo`,
    method: 'post',
    data,
  });
}

//查询字典数据列表
export function getDictDataList(data) {
  return http.request({
    url: `/admin/sys/dictionary/page`,
    method: 'post',
    data,
  });
}

//新增字典数据
export function addDictData(data) {
  return http.request({
    url: `/admin/sys/dictionary/add`,
    method: 'post',
    data,
  });
}

//编辑字典数据
export function updateDictData(data) {
  return http.request({
    url: `/admin/sys/dictionary/update`,
    method: 'put',
    data,
  });
}

//删除字典数据
export function removeDictData(data) {
  return http.request({
    url: `/admin/sys/dictionary/delete`,
    method: 'post',
    data,
  });
}

// 字典类型列表
export function listDictType() {
  return http.request({
    url: '/admin/sys/dictionary/typeList',
    method: 'get',
  });
}

// 字典类型列表
export function cloumsDictType() {
  return http.request({
    url: '/admin/sys/dictionary/cloums',
    method: 'get',
  });
}
